home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2007 March
/
PCWorld_2007-03_cd.bin
/
komunikace
/
acehtml
/
acehtmlfreeware.exe
/
scriptdef
/
Velocity Equivalents.sd
< prev
next >
Wrap
INI File
|
2006-09-13
|
6KB
|
224 lines
[SUBJECT]
Description=Converts between different units of velocity
ImageIndex=-1
Folder=Mathematics
[BODY_TEXT]
;<!-- Cut-N-Paste JavaScript from ISN Toolbox
;Copyright 1996, Infohiway Server Network. Restricted use is hereby
;granted (both personal and commercial use OK so long as this code is
;not *directly* sold), providing this notice is buried somewhere deep
;in your HTML document. A link to http://www.infohiway.com is always
;appreciated, but is absolutely and positively not necessary. :-) -->
;
;<script language="JavaScript">
;
;<!-- Hide JavaScript from Java-Impaired Browsers
;
;function initArray() {
;
; this.length = initArray.arguments.length;
;
; for (var i = 0; i < this.length; i++) {
;
; this[i] = initArray.arguments[i];
;
; }
;
; }
;
;/* Please don't ask about this work-around. It works... We're sure arrays
;
; will be better supported soon. */
;
;var isn07 = new initArray("4b","5b","8b","8b");
;
;isn07[0] = "~01~10.01~20.6~30.036~40.03281~51.9685~60.02237~70.01944~8";
;
;isn07[1] = "~0100~11~260~33.6~43.281~5196.85~62.237~71.944~8";
;
;isn07[2] = "~01.66667~10.016667~21~30.06~40.05468~53.281~60.03728~70.03240~8";
;
;isn07[3] = "~027.78~10.2778~216.6667~31~40.9113~554.68~60.6214~70.53996~8";
;
;isn07[4] = "~030.48~10.3048~218.29~31.097~41~560~60.68181818~70.59248~8";
;
;isn07[5] = "~00.5080~10.00508~20.3048~30.01829~40.016667~51~60.01136~70.00987~8";
;
;isn07[6] = "~044.7~10.447~226.82~31.609~41.467~588~61~70.86898~8";
;
;isn07[7] = "~051.44~10.5144~230.87~31.852~41.688~5101.3~61.151~71~8";
;
;
;
;
;
;function velCon() {
;
; // First, get the variables checked by the user
;
; for (var i = 0; i < 8; i++) {
;
; if (document.isnform07.veli[i].checked) {
;
; veli = i;
;
; velinm = document.isnform07.veli[i].value;
;
; }
;
; }
;
; for (var i = 0; i < 8; i++) {
;
; if (document.isnform07.velo[i].checked) {
;
; velo = i;
;
; velonm = document.isnform07.velo[i].value;
;
; }
;
; }
;
; // Now grab the numeric input by user and parse to be sure numeric
;
; useri = document.isnform07.velinp.value;
;
; if (useri == 0) {
;
; useri = 1;
;
; document.isnform07.velinp.value = useri;
;
; }
;
; mulstr = isn07[veli];
;
; picker = "~" + velo;
;
; ps = mulstr.indexOf(picker);
;
; velo++;
;
; picker = "~" + velo;
;
; ps1 = mulstr.indexOf(picker);
;
; mulstr = mulstr.substring((ps + 2),ps1);
;
; ps = (useri * mulstr);
;
; picker = "";
;
; picker += ps;
;
; ps1 = picker.indexOf(".");
;
; if (ps1 > -1) {
;
; // Correct for binary/floating point conversion error
;
; ps = ps + .000001;
;
; picker = "";
;
; picker += ps;
;
; ps2 = picker.indexOf("e");
;
; if (ps2 < 0) {
;
; picker = picker.substring(0,(ps1 + 6));
;
; }
;
; if (ps2 == 0 || ps2 > 0) {
;
; ps3 = picker.indexOf("00000");
;
; if (ps3 > 0) {
;
; picker = picker.substring(0,ps3 + 1) + picker.substring(ps2,picker.length);
;
; }
;
; }
;
; }
;
; picker = useri + " " + velinm + " = " + picker + " " + velonm;
;
; document.isnform07.velout.value = picker;
;
; }
;
;// End Hiding -->
;
;
;
;</script>
;<form name="isnform07">
;<table border="1" width="486" summary="">
;
;<tr><td colspan="10" align="center"><font color="blue"><b>`Caption`</b></FONT></TD></tr>
;
;<tr><td colspan="10" valign="top"><font size="1"><b>First, type the number you wish converted here: </b>
;
;<input type="text" name="velinp" size="30" value="" onChange="velCon();"><br><b>Then, click radio buttons for desired conversion:</B></font></td></tr>
;
;<tr><td align="center"><font color="red" size="1"><b>Fm:</b></font></td>
;
;<td align="center" valign="top"><font size="1">cm/sec<br><input type="radio" name="veli" value="cm/sec" checked onClick = ""></FONT></TD>
;
;<td align="center" valign="top"><font size="1">m/sec<br><input type="radio" name="veli" value="m/sec" onClick = ""></FONT></TD>
;
;<td align="center" valign="top"><font size="1">m/min<br><input type="radio" name="veli" value="m/min" onClick = ""></FONT></TD>
;
;<td align="center" valign="top"><font size="1">km/hr<br><input type="radio" name="veli" value="km/hr" onClick = ""></FONT></TD>
;
;<td align="center" valign="top"><font size="1">ft/sec<br><input type="radio" name="veli" value="ft/sec" onClick = ""></FONT></TD>
;
;<td align="center" valign="top"><font size="1">ft/min<br><input type="radio" name="veli" value="ft/min" onClick = ""></FONT></TD>
;
;<td align="center" valign="top"><font size="1">mi/hr<br><input type="radio" name="veli" value="mi/hr" onClick = ""></FONT></TD>
;
;<td align="center" valign="top"><font size="1">Knots<br><input type="radio" name="veli" value="Knots" onClick = ""></FONT></TD>
;
;<tr><td align="center"><font color="red" size="1"><b>To:</b></FONT></TD>
;
;<td align="center" valign="top"><font size="1">cm/sec<br><input type="radio" name="velo" value="cm/sec" onClick = ""></FONT></TD>
;
;<td align="center" valign="top"><font size="1">m/sec<br><input type="radio" name="velo" value="m/sec" checked onClick = ""></FONT></TD>
;
;<td align="center" valign="top"><font size="1">m/min<br><input type="radio" name="velo" value="m/min" onClick = ""></FONT></TD>
;
;<td align="center" valign="top"><font size="1">km/hr<br><input type="radio" name="velo" value="km/hr" onClick = ""></FONT></TD>
;
;<td align="center" valign="top"><font size="1">ft/sec<br><input type="radio" name="velo" value="ft/sec" onClick = ""></FONT></TD>
;
;<td align="center" valign="top"><font size="1">ft/min<br><input type="radio" name="velo" value="ft/min" onClick = ""></FONT></TD>
;
;<td align="center" valign="top"><font size="1">mi/hr<br><input type="radio" name="velo" value="mi/hr" onClick = ""></FONT></TD>
;
;<td align="center" valign="top"><font size="1">Knots<br><input type="radio" name="velo" value="Knots" onClick = ""></FONT></TD>
;
;<tr><td colspan="10" align="center" valign="top"><font size="1"><input type="button" value=" Click for Conversion " onClick="velCon();">
;<input type="reset" value=" Reset Values "><br><input type="text" name="velout" size="60" value="" onClick="velCon();">
;
;</font></td></tr>
;
;</table></form>
;
;<p>
;
[`Caption`]
Kind=S
Value=Velocity Equivalents